package com.atguigu.security.eduservice.controller;

import com.atguigu.commonutils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

@Api("用户controller")
@RestController
@RequestMapping("/eduservice/user")
public class EduUserController {

    @ApiOperation(value = "登陆")
    @PostMapping("logIn")
    public R logIn() {
        return R.ok().data("token","admin");
    }

    @ApiOperation(value = "逻辑删除讲师")
    @GetMapping("/info/{id}")
    public R info(@ApiParam(name = "id", value = "讲师ID", required = true) @PathVariable String id) {
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar","");
    }

}
